package com.qf.day04;

import java.util.Scanner;

public class zuoye1 {
    public static int qb(int x){
        x+=2;
        return x;
    }
    public static void main(String[] args) {
        int[] ysfh = {0,1,2,3,4,5,6,7};
        System.out.println("请几号开始报数");
        Scanner sc = new Scanner(System.in);
        int index = sc.nextInt();
        for (int i = index; i < ysfh.length; i++) {
            if(ysfh[i+1]==-1){
                continue;
            }
            if(ysfh[i]==-1){
                continue;
            }
          int s =  qb(i);
          if(s>7){
              s=s-ysfh.length;
          }
          ysfh[s]=-1;
          i=s;
        }
    }
}
